.url-select-wrapper {
  position: relative;
  flex: 1;
  margin-left: 2px;
}

.url-select-input {
  display: inline-flex;
  align-items: center;
  height: var(--swm-button-size);
  padding: 0 8px;
  font-size: 13px;
  line-height: 1;
  border: 0px solid transparent;
  border-radius: 18px;
  background-color: var(--swm-url-select-background);
  color: var(--swm-url-select);
  box-sizing: border-box;
  cursor: text;
  width: 100%;
  --vscode-settings-textInputBackground: transparent;
}
.url-select-input:hover[data-state="closed"] {
  background-color: var(--swm-url-select-hover-background);
  --vscode-settings-textInputBackground: transparent;
}
.url-select-input:focus[data-state="closed"] {
  box-shadow: var(--swm-focus-outline);
}
.url-select-input[data-state="open"] {
  border-radius: 18px 18px 0 0;
}
.url-select-input:disabled {
  background-color: var(--swm-url-select-disabled-background);
  color: var(--swm-url-select-disabled);
  cursor: not-allowed;
}

.vscode-high-contrast .url-select-input {
  border: var(--swm-dropdown-border);

  &[data-state="open"] {
    border-bottom: none;
  }
}

.url-select-content {
  z-index: 1;
  background-color: var(--swm-url-select-background);
  border-radius: 0 0 18px 18px;
  height: fit-content;
  box-shadow: var(--swm-backdrop-shadow);
  overflow: hidden;
}

.vscode-high-contrast .url-select-content {
  border: var(--swm-dropdown-border);
  border-top: none;
}

.url-select-viewport {
  padding-inline: 5px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.url-select-label {
  padding: 5px 5px 3px 5px;
  font-size: 12px;
  color: var(--swm-url-select-label);
  user-select: none;
}

.url-select-separator {
  min-height: 1px;
  margin-block: 2px;
  margin-inline: 3px;
  background-color: var(--swm-url-select-separator);
}

.url-select-separator-top {
  height: 1px;
  background-color: var(--swm-url-select-separator);
  margin-inline: 8px;
  margin-bottom: 2px;
  margin-top: 0;
}

.url-select-separator-bottom {
  height: 1px;
  background-color: var(--swm-url-select-separator);
  margin-inline: 8px;
  margin-block: 2px;
}

.url-select-item {
  font-size: 13px;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 30px;
  height: auto;
  padding: 0 8px;
  position: relative;
  border-radius: 4px;
  color: var(--swm-default-text);
}
.url-select-item:hover,
.url-select-item:focus {
  outline: none;
  background-color: var(--swm-url-select-highlighted-background);
  cursor: pointer;
}

.url-select-item-text {
  overflow: hidden;
  padding-top: 6px;
  padding-bottom: 6px;
  text-overflow: ellipsis;
  word-break: break-all;
  word-wrap: break-word;
}
.url-select-item-text-search {
  font-weight: bold;
}
.url-select-item-text-dynamic {
  color: var(--swm-url-select-special-text);
}

.url-select-item-remove {
  cursor: pointer;
  background: none;
  border: none;
  color: var(--swm-icon-button);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms 0ms ease-in-out;
}
.url-select-item-remove:hover {
  color: var(--swm-icon-button-hover);
}
.url-select-item-remove:active {
  color: var(--swm-icon-button-active);
  transform: scale(0.9);
}

.url-select-group-outside {
  overflow: hidden;
  border-radius: 4px 4px 12px 12px;
  margin-bottom: 5px;
  margin-inline: 5px;
}

.url-select-button {
  display: inline-flex;
}
.url-select-button-text {
  overflow: hidden;
  padding-block: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.url-select-button-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
  word-break: break-all;
  display: inline-block;
}

@media (height <= 500px) {
  .url-select-viewport {
    max-height: 30vh;
  }
}
@media (width <= 580px) {
  .url-select-button {
    display: flex;
    width: 100%;
  }
}
@media (width <= 350px) {
  .url-select-content {
    display: none;
  }
  .url-select-input {
    border-radius: 18px !important;
  }
}
